// See https://aka.ms/new-console-template for more information
using AutoMapper;
using AutoMapperStudy;


var config = AutoMapperConfiguration.Configure();

config.AssertConfigurationIsValid();


//var config = new MapperConfiguration(cfg => cfg.CreateMap<OrderDto, Order>());
var executionPlan = config.BuildExecutionPlan(typeof(OrderDto),typeof(Order));
var cfg = new MapperConfiguration(test =>
{
    test.AddProfile<AutoMapperProfile>();
});
var mapper = config.CreateMapper(); //var mapper = new Mapper(config);
var order = new Order
{
    OrderNumber = "12345",
    TotalPrice = 99.99m,
    TotalQty = 3,
    CreatedAt = DateTime.Now
};
OrderDto orderdto = mapper.Map<OrderDto>(order);
orderdto.Print();



